package com.baizhi.springmvc.service.imp;


import com.baizhi.springmvc.dao.OrderDao;
import com.baizhi.springmvc.entity.Order;
import com.baizhi.springmvc.service.OrderService;
import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class OrderServiceImp implements OrderService {
    @Autowired
    private OrderDao orderDao;
    @Override
    public void insert(Order order) {
        orderDao.insert(order);
    }

    @Override
    public List<Order> selectAllOrder() {
        List<Order> orderList = orderDao.selectAllOrder();
        return orderList;
    }

    @Override
    public void deleteOrder(Integer order_id) {
        orderDao.deleteOrder(order_id);
    }

    @Override
    public void updateOrderStatus(Integer order_id) {
        orderDao.updateOrderStatus(order_id);
    }
}
